!!! 5
!= js("basejs")
!= js("adminjs")
!= css("admincss")
html
    head
        title #{title} - Admin
        script(src="/socket.io/socket.io.js")
        link(type="image/x-icon", href="images/favico-admin.png", rel="icon")
        meta(name="apple-mobile-web-app-capable", content="yes")
    body
        #wrapper
            #header
                #menu
                    #menu-admintitle.menu-item #{title} - Admin
                    a#menu-status.menu-item.active(href="#status", title="#{title} status and general info.") Status
                    a#menu-server.menu-item(href="#server", title="Edit server configuration and settings.") Server Settings
                    a#menu-client.menu-item(href="#client", title="Edit client (browser) configuration and settings.") Client Settings
                    a#menu-users.menu-item(href="#users", title="User and roles management.") Users and Roles
                    a#menu-tools.menu-item(href="#tools", title="Tools to manage and control #{title}.") Tools
                    a#menu-back(href="/", title="Go back to the app main screen.") Back to the app...

            // The Status tab.
            // ----------------------------------------------------------------
            #tab-status.admin-tab
                h2 Status
                div Not available yet!

            // The Server Settings tab.
            // ----------------------------------------------------------------
            #tab-server.admin-tab(style="display:none")
                h2 Server Settings
                div Not available yet!

            // The Client Settings tab.
            // ----------------------------------------------------------------
            #tab-client.admin-tab(style="display:none")
                h2 Client Settings
                div Not available yet!

            // The Users and Roles tab.
            // ----------------------------------------------------------------
            #tab-users.admin-tab(style="display:none")
                h2 User management
                h4.form-title Create new user
                fieldset.edit
                    input#user-txt-display-name.username(type="text", placeholder="display name", title="Enter the user's display name or full name (NOT the username).")
                    input#user-txt-username.username(type="text", placeholder="username", title="Enter the username.")
                    input#user-txt-password.password(type="text", placeholder="password", title="Enter the user's password.")
                    input#user-txt-password-confirm.password(type="text", placeholder="confirm password", title="Confirm the user's password.")
                    button#user-but-save.save Save user
                    .roles
                        strong Roles:
                        input#user-chk-role-admin(type="checkbox", name="user-chk-roles", value="admin")
                        label(for="user-chk-role-") Admin
                        input#user-chk-role-mapcreate(type="checkbox", name="user-chk-roles", value="mapcreate")
                        label(for="user-chk-role-mapcreate") Create Maps
                        input#user-chk-role-mapedit(type="checkbox", name="user-chk-roles", value="mapedit")
                        label(for="user-chk-role-mapedit") Edit Maps
                        input#user-chk-role-entities(type="checkbox", name="user-chk-roles", value="entities")
                        label(for="user-chk-role-entities") Manage Entities
                        input#user-chk-role-auditdata(type="checkbox", name="user-chk-roles", value="auditdata")
                        label(for="user-chk-role-auditdata") Manage Audit Data
                        input#user-chk-role-auditevents(type="checkbox", name="user-chk-roles", value="auditevents")
                        label(for="user-chk-role-auditevents") Manage Audit Events
                h4 Registered users
                .grid-header
                    .displayName Display name
                    .username Username
                    .roles Roles
                    .actions Actions
                #user-grid.grid
                script#template-user-grid-row(type="text/template")
                    .row
                        .displayName <%= displayName %>
                        .username <%= username %>
                        .roles <%= roles %>
                        .actions
                            .edit
                            .delete

            // The Tools tab.
            // ----------------------------------------------------------------
            #tab-tools.admin-tab(style="display:none")
                h2 Tools
                button#tools-but-refresh.refresh(title="Click to refresh all browsers connected to #{title}.") Refresh all client screens